﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using FaceSharp.MVC.Code.Common;

namespace FaceSharp.MVC.Filters
{
    public class NoCacheAttribute : ActionFilterAttribute
    {
        public override void OnResultExecuting(ResultExecutingContext filterContext)
        {
            filterContext.HttpContext.Response.CacheControl = "no-cache";
            filterContext.HttpContext.Response.Cache.SetETag(((ShortGuid)Guid.NewGuid()).ToString());
            base.OnResultExecuting(filterContext);
        }
    }
}